<!DOCTYPE html>
<html>
<head th:include="common/header_css::header('霸王餐小程序后台管理-商品信息','%datepicker')"></head>
<!--<head th:include="common/header_css::header('霸王餐小程序后台管理-收货地址管理')"></head>-->
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div th:replace="common/toolbar::toolbar('地区表管理')"></div>
        <div th:replace="common/search::search('no')"></div>
    </div>
</div>

<!--添加Area模态框-->
<div id="modal-add-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">地区表添加</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="aform" method="post" class="form-horizontal" action="add"
                                      onsubmit="return checkAdd()">

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">地区代码 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="code"
                                                           required
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">省代码 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="sheng"
                                                           required
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">市代码 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="di"
                                                           required
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">县代码 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="xian"
                                                           required
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">地区名 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="name"
                                                           required
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">层级 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="level"
                                                           required
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-add-form">取消
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--修改Area模态框-->
<div id="modal-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">地区表修改</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="mform" method="post" class="form-horizontal" action="modify"
                                      onsubmit="return checkModify()">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">地区代码 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="code" name="code"
                                                           required
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">省代码 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="sheng" name="sheng"
                                                           required
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">市代码 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="di" name="di"
                                                           required
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">县代码 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="xian" name="xian"
                                                           required
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">地区名 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="name" name="name"
                                                           required
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">层级 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="level" name="level"
                                                           required
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="id" name="id" type="hidden" value=""/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div th:include="common/footer_js::footer"></div>
<script src="/js/admin/area.js"></script>
</body>
</html>
